package cate.game.role.pay.limittimeggift.msg;

import cate.common.annotation.OperationSetter;
import cate.common.table.d.GDOperation;
import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdLimitGift;
import easy.java.dev.note.NoteField;

@ClientMsg(title = "限时礼包用道具购买 的 请求")
@OperationSetter(GDOperation.LIMIT_GIFT_ITEM_BUY)
public class LimitTimeGiftBuyReq implements MsgInput {
    @NoteField(value = "限时礼包的id")
    public int tid;

    @Override
    public MsgConfig conf() {
        return MsgIdLimitGift.LIMIT_TIME_GIFT_BUY_REQ;
    }

    @Override
    public void execute(GameBody game, ClientContext cc) {
        cc.getRole().getPay().gift.buyGift(tid);
    }
}
